package reflection;






public class Test {

	public static void main(String[] args) {
		try {			
			
			myEnum e = myEnum.INSTANCE;
			myEnum a = myEnum.INSTANCE;
			
			if(e.equals(a))
				System.out.println("OK"); 	
				
			
			String className1 = "reflection.TaxMasterAdapter";
			String className2 = "reflection.GoodTaxAdapter";
			
			Class cl = Class.forName(className1);
			ITaxAdapter ita = (ITaxAdapter) cl.newInstance();	
			int taxes = ita.getTaxes(100);
			
			System.out.println(taxes); 							
		
		}
		catch (Exception e) {
			   e.printStackTrace();
		}
}
}

